﻿namespace ChessKit.Logic
{
	public struct HintedMove
	{
		public Square From { get { return Move.From; } }
		public Square To { get { return Move.To; } }
		public Move Move { get; private set; }
		public Board Board { get; private set; }
		public MoveHints Hints { get; private set; }
		public int Number { get { return Board.MoveNumber; } }
		public override string ToString() { return Move.ToString(); }

		public HintedMove(Board origin, Move move, MoveHints hints)
			: this()
		{
			Board = origin;
			Move = move;
			Hints = hints;
		}
		public HintedMove(Board origin, int fromSquare, int toSquare, MoveHints hints)
			: this(origin, new Move((Square)fromSquare, (Square)toSquare), hints)
		{
		}
		public string Print()
		{
			return string.Format("\"{0}\", \"{1}\"", Move, Hints);
		}

		public static implicit operator Move(HintedMove hintedMove)
		{
			return hintedMove.Move;
		}
	}
}